home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.1 KB | 79 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLPriStr.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef SLPRISTR_H
- #define SLPRISTR_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #include <stddef.h>
-
- #ifdef FW_BUILD_WIN
- #include <ctype.h>
- // Include for toupper, tolower, isspace
- #endif
-
- // Export or Import functions for CFM-68K [sfu]
-
- FW_EXTERN_C_BEGIN
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import on
- #elif defined(FW_ODFLIB)
- #pragma export on
- #endif
-
- size_t FW_PrimitiveStringLength(const char * p);
- // Returns the length of string p.
-
- FW_Boolean FW_PrimitiveStringEqual(const char *p1, const char *p2);
- // Compares string p1 to p2. Returns 1 if equal and 0 if false.
- // Compares bytes, not characters!
-
- int FW_PrimitiveStringCompare(const char *p1, const char *p2);
- // Compares -1 if p1<p2, 0 if p1==p2, 1 if p1>p2.
- // Compares bytes, not characters!
-
- void FW_PrimitiveStringCopy(const char *source, char *destination);
- // Copies string source to string destination.
- // Assumes that destination is large enough!
-
- char* FW_PrimitiveStringDuplicate(const char *source);
- // Duplicate string source.
-
- void FW_PrimitiveStringCatenate(const char *source, char *destination);
- // Appends string source onto string destination.
- // Assumes that destination is large enough!
-
- char * FW_PrimitiveStringFindCharacter(const char *source, char c);
- // Return pointer to first occurrence of c in source or NULL if not present.
-
- char FW_PrimitiveCharacterToUpper(char c);
- // Return character c converted to upper case.
-
- char FW_PrimitiveCharacterToLower(char c);
- // Return character c converted to lower case.
-
- char FW_PrimitiveCharacterIsSpace(char c);
- // Returns non-zero if character is space, tab, carriage return, or newline.
-
- // For CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import off
- #elif defined(FW_ODFLIB)
- #pragma export off
- #endif
-
- FW_EXTERN_C_END
-
- #endif
-